import { mapGetters } from 'vuex';

export default {
  computed: {
    ...mapGetters(['authentication'])
  },

  methods: {
    authModal() {
      const modalProps = {
        okButtonProps: {
          props: {
            shape: 'round'
          }
        },
        cancelButtonProps: {
          props: {
            shape: 'round'
          }
        }
      };

      if (!this.authentication) {
        const _self = this;
        this.$confirm({
          title: 'Tips',
          content: 'You need to complete your personal information and bank account information to get your loan limit!',
          cancelText: 'Cancel',
          okText: 'To perfect',
          ...modalProps,
          onOk() {
            _self.$router.push({
              name: 'ModifyBasicSettings'
            });
          }
        });
      }
    }
  }
};
